package com.cheers.service;

import java.util.List;
import java.util.Map;

import com.cheers.model.LuckEvent;

public interface LuckEventService {
	
	/**
	 * 添加幸运活动
	 * @param luckEvent
	 * @throws Exception
	 */
	public void add(LuckEvent luckEvent) throws Exception;
	
	

	/**
	 * 获取推荐
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> recd() throws Exception;
	
	/**
	 * 活动详情
	 * @param luckId
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> load(String luckId) throws Exception;
	
	/**
	 * 活动详情
	 * @param cgyId
	 * @param phase
	 * @return
	 * @throws Exception
	 */
	public Map<String, String> load(String cgyId, int phase) throws Exception;
	
	/**
	 * 查找该期活动我的兑换列表
	 * @param userId
	 * @param luckId
	 * @param phase
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> find(String userId, String luckId, int phase, int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 活动获奖者
	 * @param luckId
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> winner(String luckId) throws Exception;
	
	/**
	 * 抽奖
	 * @throws Exception
	 */
	public void lottery() throws Exception;
	
	/**
	 * 剩余人次
	 * @param luckId
	 * @return
	 * @throws Exception
	 */
	public int lastChance(String luckId) throws Exception;
	
	/**
	 * 获取幸运活动参加者列表
	 * @param luckId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> joinList(String luckId, int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 用积分兑换商品
	 * @param userId
	 * @param luckId
	 * @param num
	 * @return
	 * @throws Exception
	 */
	public String luck(String userId, String luckId, int num) throws Exception;

	/**
	 * 获取幸运列表
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> list(int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 获取往期幸运列表
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> phaseList(int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 活动期数列表
	 * @param cgyId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> phaseList(String cgyId, int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 活动期数
	 * @param cgyId
	 * @return
	 * @throws Exception
	 */
	public String phaseNum(String cgyId) throws Exception;
	
	/**
	 * 获奖者列表
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> winnerList(int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 我的幸运码
	 * @param userId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> codeList(String userId, int pageIndex, int pageSize) throws Exception;
	
	/**
	 * 获取兑换记录列表
	 * @param userId
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	public List<Map<String, Object>> exchangeList(String userId, int pageIndex, int pageSize) throws Exception;
	
}
